<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>我的成绩管理系统</title>


    <!-- Font Awesome -->
    <link rel="stylesheet" href="/plugins/fontawesome-free/css/all.min.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="/dist/css/adminlte.min.css">

    <link rel="stylesheet" href="/plugins/bootstraptable/bootstrap-table.min.css">

    <!-- Select2 -->
    <link rel="stylesheet" href="/plugins/select2/css/select2.min.css">
    <link rel="stylesheet" href="/plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css">

</head>
<body class="hold-transition sidebar-mini">
<div class="wrapper">
<!--    &lt;!&ndash; Navbar &ndash;&gt;-->
<!--    <nav class="main-header navbar navbar-expand navbar-white navbar-light">-->
<!--        &lt;!&ndash; Left navbar links &ndash;&gt;-->
<!--        <ul class="navbar-nav">-->
<!--            <li class="nav-item">-->
<!--                <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>-->
<!--            </li>-->
<!--            <li class="nav-item d-none d-sm-inline-block">-->
<!--                <a href="/index3.html" class="nav-link">Home</a>-->
<!--            </li>-->
<!--            <li class="nav-item d-none d-sm-inline-block">-->
<!--                <a href="#" class="nav-link">Contact</a>-->
<!--            </li>-->
<!--        </ul>-->

<!--        &lt;!&ndash; Right navbar links &ndash;&gt;-->
<!--        <ul class="navbar-nav ml-auto">-->
<!--            &lt;!&ndash; Navbar Search &ndash;&gt;-->
<!--            <li class="nav-item">-->
<!--                <a class="nav-link" data-widget="navbar-search" href="#" role="button">-->
<!--                    <i class="fas fa-search"></i>-->
<!--                </a>-->
<!--                <div class="navbar-search-block">-->
<!--                    <form class="form-inline">-->
<!--                        <div class="input-group input-group-sm">-->
<!--                            <input class="form-control form-control-navbar" type="search" placeholder="Search"-->
<!--                                   aria-label="Search">-->
<!--                            <div class="input-group-append">-->
<!--                                <button class="btn btn-navbar" type="submit">-->
<!--                                    <i class="fas fa-search"></i>-->
<!--                                </button>-->
<!--                                <button class="btn btn-navbar" type="button" data-widget="navbar-search">-->
<!--                                    <i class="fas fa-times"></i>-->
<!--                                </button>-->
<!--                            </div>-->
<!--                        </div>-->
<!--                    </form>-->
<!--                </div>-->
<!--            </li>-->

<!--            &lt;!&ndash; Messages Dropdown Menu &ndash;&gt;-->
<!--            <li class="nav-item dropdown">-->
<!--                <a class="nav-link" data-toggle="dropdown" href="#">-->
<!--                    <i class="far fa-comments"></i>-->
<!--                    <span class="badge badge-danger navbar-badge">3</span>-->
<!--                </a>-->
<!--                <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">-->
<!--                    <a href="#" class="dropdown-item">-->
<!--                        &lt;!&ndash; Message Start &ndash;&gt;-->
<!--                        <div class="media">-->
<!--                            <img src="/dist/img/user1-128x128.jpg" alt="User Avatar"-->
<!--                                 class="img-size-50 mr-3 img-circle">-->
<!--                            <div class="media-body">-->
<!--                                <h3 class="dropdown-item-title">-->
<!--                                    Brad Diesel-->
<!--                                    <span class="float-right text-sm text-danger"><i class="fas fa-star"></i></span>-->
<!--                                </h3>-->
<!--                                <p class="text-sm">Call me whenever you can...</p>-->
<!--                                <p class="text-sm text-muted"><i class="far fa-clock mr-1"></i> 4 Hours Ago</p>-->
<!--                            </div>-->
<!--                        </div>-->
<!--                        &lt;!&ndash; Message End &ndash;&gt;-->
<!--                    </a>-->
<!--                    <div class="dropdown-divider"></div>-->
<!--                    <a href="#" class="dropdown-item">-->
<!--                        &lt;!&ndash; Message Start &ndash;&gt;-->
<!--                        <div class="media">-->
<!--                            <img src="/dist/img/user8-128x128.jpg" alt="User Avatar"-->
<!--                                 class="img-size-50 img-circle mr-3">-->
<!--                            <div class="media-body">-->
<!--                                <h3 class="dropdown-item-title">-->
<!--                                    John Pierce-->
<!--                                    <span class="float-right text-sm text-muted"><i class="fas fa-star"></i></span>-->
<!--                                </h3>-->
<!--                                <p class="text-sm">I got your message bro</p>-->
<!--                                <p class="text-sm text-muted"><i class="far fa-clock mr-1"></i> 4 Hours Ago</p>-->
<!--                            </div>-->
<!--                        </div>-->
<!--                        &lt;!&ndash; Message End &ndash;&gt;-->
<!--                    </a>-->
<!--                    <div class="dropdown-divider"></div>-->
<!--                    <a href="#" class="dropdown-item">-->
<!--                        &lt;!&ndash; Message Start &ndash;&gt;-->
<!--                        <div class="media">-->
<!--                            <img src="/dist/img/user3-128x128.jpg" alt="User Avatar"-->
<!--                                 class="img-size-50 img-circle mr-3">-->
<!--                            <div class="media-body">-->
<!--                                <h3 class="dropdown-item-title">-->
<!--                                    Nora Silvester-->
<!--                                    <span class="float-right text-sm text-warning"><i class="fas fa-star"></i></span>-->
<!--                                </h3>-->
<!--                                <p class="text-sm">The subject goes here</p>-->
<!--                                <p class="text-sm text-muted"><i class="far fa-clock mr-1"></i> 4 Hours Ago</p>-->
<!--                            </div>-->
<!--                        </div>-->
<!--                        &lt;!&ndash; Message End &ndash;&gt;-->
<!--                    </a>-->
<!--                    <div class="dropdown-divider"></div>-->
<!--                    <a href="#" class="dropdown-item dropdown-footer">See All Messages</a>-->
<!--                </div>-->
<!--            </li>-->
<!--            &lt;!&ndash; Notifications Dropdown Menu &ndash;&gt;-->
<!--            <li class="nav-item dropdown">-->
<!--                <a class="nav-link" data-toggle="dropdown" href="#">-->
<!--                    <i class="far fa-bell"></i>-->
<!--                    <span class="badge badge-warning navbar-badge">15</span>-->
<!--                </a>-->
<!--                <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">-->
<!--                    <span class="dropdown-item dropdown-header">15 Notifications</span>-->
<!--                    <div class="dropdown-divider"></div>-->
<!--                    <a href="#" class="dropdown-item">-->
<!--                        <i class="fas fa-envelope mr-2"></i> 4 new messages-->
<!--                        <span class="float-right text-muted text-sm">3 mins</span>-->
<!--                    </a>-->
<!--                    <div class="dropdown-divider"></div>-->
<!--                    <a href="#" class="dropdown-item">-->
<!--                        <i class="fas fa-users mr-2"></i> 8 friend requests-->
<!--                        <span class="float-right text-muted text-sm">12 hours</span>-->
<!--                    </a>-->
<!--                    <div class="dropdown-divider"></div>-->
<!--                    <a href="#" class="dropdown-item">-->
<!--                        <i class="fas fa-file mr-2"></i> 3 new reports-->
<!--                        <span class="float-right text-muted text-sm">2 days</span>-->
<!--                    </a>-->
<!--                    <div class="dropdown-divider"></div>-->
<!--                    <a href="#" class="dropdown-item dropdown-footer">See All Notifications</a>-->
<!--                </div>-->
<!--            </li>-->
<!--            <li class="nav-item">-->
<!--                <a class="nav-link" data-widget="fullscreen" href="#" role="button">-->
<!--                    <i class="fas fa-expand-arrows-alt"></i>-->
<!--                </a>-->
<!--            </li>-->
<!--            <li class="nav-item">-->
<!--                <a class="nav-link" data-widget="control-sidebar" data-slide="true" href="#" role="button">-->
<!--                    <i class="fas fa-th-large"></i>-->
<!--                </a>-->
<!--            </li>-->
<!--        </ul>-->
<!--    </nav>-->
<!--    &lt;!&ndash; /.navbar &ndash;&gt;-->


<!--    menu start-->
    <div th:replace="fragment/menu::mainmenu(2)"></div>
<!--menu end-->
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <div class="container-fluid">
                <div class="row mb-2">
                    <div class="col-sm-6">
                        <h1>课程列表</h1>
                    </div>
                    <div class="col-sm-6">
                        <ol class="breadcrumb float-sm-right">
                            <li class="breadcrumb-item"><a href="#">Home</a></li>
                            <li class="breadcrumb-item active">课程列表</li>
                        </ol>
                    </div>
                </div>
            </div><!-- /.container-fluid -->
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="container-fluid">
                <div class="row">
                    <div class="btn-group">
                        <a class="btn btn-app">
                            <i class="fas fa-edit" data-toggle="modal" data-target="#myModal" onclick="addBefore()"></i> 新增
                        </a>
                        <a class="btn btn-app">
                            <i class="fas fa-edit"onclick="delrows()"></i> 删除
                        </a>
                    </div>
                </div>


                <table class="table table-bordered" id="courseTable">

                </table>


            </div><!-- /.container-fluid -->
        </section>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->
    <footer class="main-footer">
        <div class="float-right d-none d-sm-block">
            <b>Version</b> 3.1.0
        </div>
        <strong>Copyright &copy; 2014-2021 <a href="https://adminlte.io">AdminLTE.io</a>.</strong> All rights reserved.
    </footer>
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="myModalLabel">课程信息</h4>
                </div>
                <form role="form" method="post" id="courseForm">

                    <input type="hidden" id="id" name="id" value="-1"/>


                    <div class="modal-body">
                        <div class="box-body">

                            <div class="form-group">
                                <label for="courseName">课程名</label>
                                <input type="text" class="form-control" id="courseName" name="courseName" placeholder="请输入课程名"
                                       required minlength="2" maxlength="20">
                            </div>
                            <div class="form-group">
                                <label for="teacherId">教师：</label>
                                <select class="form-control select2" style="width: 100%" id="teacherId" name="teacherId" >

                                </select>
                            </div>
                        </div>
                        <!-- /.box-body -->
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                        <a href="#" onclick="submitCourseForm();" class="btn btn-primary">提交更改</a>
                    </div>

                </form>
            </div><!-- /.modal-content -->
        </div><!-- /.modal -->
    </div>
</div>
<!-- ./wrapper -->

<!-- jQuery -->
<script src="/plugins/jquery/jquery.min.js"></script>
<!-- Bootstrap 4 -->
<script src="/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- AdminLTE App -->
<script src="/dist/js/adminlte.min.js"></script>
<script src="/plugins/bootstraptable/bootstrap-table.min.js"></script>


<script src="/plugins/bootstraptable/bootstrap-table-locale-all.min.js"></script>
<script src="/plugins/jquery-validation/jquery.validate.min.js"></script>
<script src="/plugins/jquery-validation/localization/messages_zh.min.js"></script>

<!-- Select2 -->
<script src="/plugins/select2/js/select2.full.min.js"></script>
<script src="/pages/course.js"></script>


</body>
</html>
